#include "precompile.h"

#include "ToolBar.h"
#include "form/IButton.h"

ToolBar::ToolBar()
	:m_align(kToolBarAlign_top)
{
}

ToolBar::~ToolBar()
{
}

IButton* ToolBar::AddButton()
{
	IObject* control = AddControl(CLSID_Button);
	if (control)
	{
		sys::InterfacePtr<IButton> pIFButton(control);
		return pIFButton;
	}
	return NULL;
}

void ToolBar::SetAlign(kToolBarAlign value)
{
	m_align = value;
}

IToolBar::kToolBarAlign ToolBar::GetAlign() const
{
	return m_align;
}

void ToolBar::SetName(const String& value)
{
	m_name = value;
}

const String& ToolBar::GetName() const
{
	return m_name;
}